{extend name="admin/base" /}
{block name="resources"}
<link rel="stylesheet" type="text/css" href="ADMIN_CSS/promotion_block.css">
<style>
.applet-list {}
.applet-item {padding: 15px;background: #f5f7fa;margin: 0 10px 10px 10px;display: inline-block;width: 280px;}
.applet-item .applet-img {width: 100%;padding: 50% 0;position: relative;overflow: hidden;}
.applet-item .applet-img img{position: absolute;width: 100%;height: auto;max-height: 100%;left: 50%;top: 50%;transform: translate(-50%,-50%);}
.applet-item .applet-name {font-size: 14px;line-height: 1;background: none;padding: 0;margin-top: 10px}
.applet-item .applet-desc {line-height: 1.5;font-size: 12px;color: #666;margin:10px 0;height: 38px;overflow: hidden;text-overflow: ellipsis;}
.empty {text-align: center;height: 150px;line-height: 150px;}
</style>
{/block}
{block name="main"}
<div class="set-style">
	<h4 class="first"><span></span>已购小程序</h4>
	<div class="applet-list">
		{notempty name="$applet_list"}
			{foreach name="applet_list" item="item"}
			<div class="applet-item">
				<div class="applet-img">
					<img src="{$item.product_info.image}" alt="">				
				</div>
				<h4 class="applet-name">{$item.product_info.module_name}</h4>
				<p class="applet-desc">
					{$item.product_info.summary}
				</p>
				<div>
					<!-- <button class="btn-common btn-small" style="margin:0 5px 0 0 !important;">在线发布</button> -->
					<a href="{:__URL('ADMIN_MAIN/wchat/downloadApplet?mark='.$item['module_mark'].'&type='.$item['type'])}"><button class="btn-common btn-small" style="margin:0 5px 0 0 !important;">下载小程序源码包</button></a>
				</div>
			</div>
			{/foreach}
		{else/}
			<div class="empty">
				您还未购买过小程序，<a href="https://www.niushop.com.cn/product.html" target="_blank">前去购买</a>
			</div>
		{/notempty}
	</div>
</div>
{/block}